<?php
namespace app\admin\model\goods;

use think\Model;

class GoodsSpec extends Model
{
    // 表名
    protected $name = 'goods_spec';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    
    // 关联商品
    public function goods()
    {
        return $this->belongsTo('Goods', 'goods_id', 'id');
    }
}